Add MkDocs Material documentation site with per-platform webhook guides and GitHub Pages deployment#23
Conversation
…es deployment workflow Co-authored-by: cvraut <10603882+cvraut@users.noreply.github.com>
|
I was unaware than mkdocs1.0 has been sunsetted... can you redo the documentation to use zensical instead? |
There was a problem hiding this comment.
Pull request overview
Adds a MkDocs Material documentation site for whecho, with platform-specific webhook setup guides and a GitHub Actions workflow to deploy the site to GitHub Pages.
Changes:
- Introduces MkDocs Material configuration (
mkdocs.yml) with navigation + markdown extensions. - Adds documentation pages for the Python API and platform webhook setup (Discord/Slack/Webex/Teams).
- Adds a GitHub Actions workflow to build and deploy docs to GitHub Pages.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| mkdocs.yml | Configures MkDocs Material theme, nav, and markdown extensions for the new docs site. |
| docs/index.md | Adds a home/quickstart page, CLI reference, supported platforms list, and TOC. |
| docs/api.md | Documents the public whecho_simple API and configuration details. |
| docs/platforms/discord.md | Adds a Discord webhook acquisition + usage walkthrough. |
| docs/platforms/slack.md | Adds a Slack Incoming Webhooks walkthrough. |
| docs/platforms/webex.md | Adds a Webex Incoming Webhooks walkthrough with payload details. |
| docs/platforms/teams.md | Adds a Microsoft Teams Incoming Webhooks walkthrough. |
| .github/workflows/docs.yml | Builds docs on main and deploys them to GitHub Pages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| - pymdownx.inlinehilite | ||
| - pymdownx.snippets | ||
| - attr_list | ||
| - md_in_html |
There was a problem hiding this comment.
Several docs pages use Markdown tables, but the tables extension isn’t enabled. MkDocs (Python-Markdown) doesn’t render tables unless tables is configured, so the tables in docs/index.md and docs/api.md will likely render as plain text. Add the tables markdown extension in mkdocs.yml.
| - md_in_html | |
| - md_in_html | |
| - tables |
| | Platform | Guide | | ||
| |---|---| | ||
| | Discord | [Discord Webhook Setup](platforms/discord.md) | | ||
| | Slack | [Slack Webhook Setup](platforms/slack.md) | | ||
| | Webex | [Webex Webhook Setup](platforms/webex.md) | | ||
| | Microsoft Teams | [Teams Webhook Setup](platforms/teams.md) | |
There was a problem hiding this comment.
The table syntax has an extra leading | on each row (|| ...), which creates an unintended empty first column (or can break rendering depending on the Markdown parser). Use standard table rows with a single leading pipe (| Platform | Guide |, etc.) here (and similarly in docs/api.md).
| - `**bold**` or `*bold*` | ||
| - `_italic_` |
There was a problem hiding this comment.
*bold* is typically italic in Markdown, not bold. This bullet should describe bold as **bold** (or __bold__) and reserve single-asterisk (or single-underscore) examples for italic.
| - `**bold**` or `*bold*` | |
| - `_italic_` | |
| - `**bold**` or `__bold__` | |
| - `*italic*` or `_italic_` |
| @@ -0,0 +1,53 @@ | |||
| site_name: whecho | |||
| site_description: Linux echo with webhooks! | |||
| site_url: https://cvraut.github.io/whecho | |||
There was a problem hiding this comment.
For GitHub Pages sites served from a project subpath, it’s generally better to set site_url with a trailing slash (.../whecho/) to avoid canonical/SEO and relative URL edge cases. Consider updating site_url accordingly.
| site_url: https://cvraut.github.io/whecho | |
| site_url: https://cvraut.github.io/whecho/ |
| python-version: '3.11' | ||
|
|
||
| - name: Install MkDocs and Material theme | ||
| run: pip install "mkdocs-material" "mkdocs<2" |
There was a problem hiding this comment.
The workflow pins MkDocs but leaves mkdocs-material unpinned, which can introduce breakages from upstream theme releases. Consider pinning mkdocs-material to a known-good version range (or using a docs/requirements.txt / requirements-docs.txt with both pinned) and installing from that to make builds reproducible.
| run: pip install "mkdocs-material" "mkdocs<2" | |
| run: pip install "mkdocs-material>=9.5,<10" "mkdocs<2" |
|
closing PR as work is continuing in #24 instead |
whecho had no structured documentation beyond a README, making it hard to discover and difficult to onboard across platforms other than Discord.
Documentation structure (
docs/)index.md— Home page: what is whecho, quickstart (init → send), CLI reference, supported platforms table, TOCapi.md—whecho_simplereference: signature, parameters, return values, exceptions, platform auto-detection table, config file locations per OSplatforms/discord.md— Discord webhook creation walkthroughplatforms/slack.md— Slack App + Incoming Webhooks setup walkthroughplatforms/webex.md— Webex App Hub webhook setup; calls out Markdown support via themarkdownpayload fieldplatforms/teams.md— Teams Incoming Webhook connector setup, including note on new Teams app navigation differencesConfig (
mkdocs.yml)Material theme with dark/light toggle,
navigation.tabs,navigation.sections,content.code.copy, andpymdownxextensions for admonitions and fenced code.CI (
/.github/workflows/docs.yml)Builds with
mkdocs build --strictand deploys to GitHub Pages viaactions/upload-pages-artifact+actions/deploy-pageson push tomain. Pinsmkdocs<2to avoid the breaking MkDocs 2.0 release (incompatible with Material theme).Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.